package IC.Parser;

public class SyntaxError extends Exception {
	private int line;
	private String message, value;
	
    public SyntaxError(String message) {
     // do something
    	super(message);
    	this.message = message;
    }
    
    public SyntaxError(String message,int line, String value)
    {
    	super(message);
    	this.message = message;
    	this.line = ++line;
    	this.value = value;
    }
    
    public String toString()
    {
    	if (this.value == null)
    		return this.line + ": " + this.message;
    	else
    		return this.line + ": " + this.message + " " + this.value.toString();
    	
    }
	
}
